package xyz.wanwanwan.www.hrm.searchcourse.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import xyz.wanwanwan.www.hrm.CourseDoc;
import xyz.wanwanwan.www.hrm.fallback.SearchCourseClientFallbackFactory;
import xyz.wanwanwan.www.hrm.query.CourseQuery;
import xyz.wanwanwan.www.hrm.util.AjaxResult;

@FeignClient(value = "search-server",fallbackFactory =SearchCourseClientFallbackFactory.class)
public interface SearchCourseClient {
    @PostMapping("/es/save")
    AjaxResult saveDoc(@RequestBody CourseDoc courseDoc);
    @PostMapping("/es/del/{id}")
    AjaxResult delDoc(@PathVariable("id") Long id);
    @PostMapping("/es/queryCourses")
    AjaxResult queryCourse(@RequestBody CourseQuery query);
}
